package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_discover_spec;

//DAO
public interface U_discover_specMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_DISCOVER_SPEC  WHERE ID = #{id}")
	public ApiU_discover_spec findU_discover_specById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_discover_spec")
	public List<ApiU_discover_spec> findU_discover_specs();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_discover_specsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_DISCOVER_SPEC (CONN_ID, PRICE_NAME, PRICE, LIMIT, SORT, TYPE) VALUES (#{conn_id}, #{price_name}, #{price}, #{limit}, #{sort}, #{type})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_discover_spec(ApiU_discover_spec u_discover_spec);

	// 修改
	@Update("UPDATE U_DISCOVER_SPEC SET CONN_ID = #{conn_id}, PRICE_NAME = #{price_name}, PRICE = #{price}, LIMIT = #{limit}, SORT = #{sort}, TYPE = #{type} WHERE ID = #{id}")
	public int updateU_discover_spec(ApiU_discover_spec u_discover_spec);

	// 删除
	@Delete("DELETE FROM U_DISCOVER_SPEC  WHERE ID = #{id}")
	public int deleteU_discover_spec(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
